home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 353_02 / schedule.h < prev    next >
C/C++ Source or Header  |  1992-01-18  |  1KB  |  44 lines

  1. // This takes care of all gate assignments and flight scheduling.
  2. // The players flight is shuffled (changed) each move until he reads 
  3. // his ticket.  If he gets to the proper gate prior to reading the
  4. // monitor in the waiting area, (reading the monitor at the ticket
  5. // counter doesn't matter), the gates are rescheduled.
  6. //
  7. // The method named check_flight does all of the required checking
  8. // to see that everything was done properly prior to getting on
  9. // the plane.  It only does checking if the player is on one of the
  10. // planes.
  11.  
  12. #ifndef SCHEDULE_H
  13. #define SCHEDULE_H
  14.  
  15. #include "location.h"
  16.  
  17. class schedule {
  18.  
  19.    location *gate[4];        // Gate names
  20.    int flight_number[4];     // There are four flights [0] to [3]
  21.    char *destination[4];
  22.    int depart_hour[4];
  23.    int depart_minute[4];
  24.    int flights_frozen;       // Frozen after monitor is read in the
  25.                              //  waiting area
  26.    int gates_frozen;         // Frozen after ticket is read
  27.    int my_gate;
  28.  
  29. public:
  30.  
  31.    schedule(void);
  32.    void shuffle_flights(void);
  33.    void shuffle_gates(void);
  34.    void list_flights(location *current_location);
  35.    void gate_message(location *current_location);
  36.    void list_actual_destination(void);
  37.    void list_time(int index);
  38.    void check_flight(void);
  39.  
  40. };
  41.  
  42. #endif
  43.  
  44.